from models.basemodel import BaseModel
from models.deepseek import DeepSeekModel
from typing import Dict, Type, Optional

class ModelManager:
    global_model_manager = None;
    def __init__(self):
        self.models:Dict[str, Type[BaseModel]] = {"DeepSeek": DeepSeekModel}

    def getModel(self, name:str) ->Optional[BaseModel]:
        if name not in self.models:
            print(f"Model not found {name}.")
            return None
        return self.models[name]()

    @staticmethod
    def getGlobalPlatformModelManager():
        if ModelManager.global_model_manager is None:
            ModelManager.global_model_manager = ModelManager()
        return ModelManager.global_model_manager
    

        
        
